package org.nothing.ordermaster.util;

import org.nothing.ordermaster.vo.ResultVO;

public class ResultVOUtil {
    /** JSON 数据 成功返回 */
    public static ResultVO success(Object object)
    {
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(object);
        return resultVO;
    }

    public static ResultVO success(Integer code, String msg)
    {
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg(msg);
        return resultVO;
    }

    public static ResultVO success()
    {
        return success(null);
    }
}
